/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.webos.java.base.workspace;

/**
 *
 * @author kostya
 */
public class Splitter extends WorkspaceItem{
    private boolean vertical = false;
    private WorkspaceItem leftItem = null;
    private WorkspaceItem rightItem = null;
    private double ratio = 0.5;

    public Splitter(WorkspaceItem aParent) {
        super(aParent);
    }

    public Splitter(String aCode){
        super(null, aCode);
    }

    public Splitter(String aCode, boolean aVertical, double aRatio){
        super(null, aCode);
        setVertical(aVertical);
        setRatio(aRatio);
    }

    public Splitter(WorkspaceItem aParent, String aCode){
        super(aParent, aCode);
    }

    /**
     * @return the vertical
     */
    public boolean isVertical() {
        return vertical;
    }

    /**
     * @param vertical the vertical to set
     */
    public void setVertical(boolean vertical) {
        this.vertical = vertical;
    }

    /**
     * @return the leftItem
     */
    public WorkspaceItem getLeftItem() {
        return leftItem;
    }

    /**
     * @param leftItem the leftItem to set
     */
    public void setLeftItem(WorkspaceItem leftItem) {
        this.leftItem = leftItem;
    }

    /**
     * @return the rightItem
     */
    public WorkspaceItem getRightItem() {
        return rightItem;
    }

    /**
     * @param rightItem the rightItem to set
     */
    public void setRightItem(WorkspaceItem rightItem) {
        this.rightItem = rightItem;
    }

    /**
     * @return the ratio
     */
    public double getRatio() {
        return ratio;
    }

    /**
     * @param ratio the ratio to set
     */
    public void setRatio(double ratio) {
        this.ratio = ratio;
    }
}
